package big;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 123
 * Date: 2023-05-05
 * Time: 19:28
 */
public class Animal {
    public String name ;
    public  int age ;

   public Animal(String name){
       this.name = name ;
       System.out.println("Animal的构造方法");
   }

static{
    System.out.println("Animal的静态代码块");
}
    {
        System.out.println("Animal的实例化代码块");
    }

    public  void eat(){
        System.out.println(name+ " 正在吃饭");
    }

}
